package com.ts.system.controller;

import com.ts.comm.SysResult;
import com.ts.system.dao.PublicDao;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.annotation.Resource;

/**
 * Created by 马俊鹏 on 2017/5/18.
 */
@Controller
public class PublicController {
	@Resource
	private PublicDao publicDao;

	/**
	 * 获得部门的json
	 */
	@RequestMapping(value = "/public/getDeptJson",method = RequestMethod.POST)
	@ResponseBody
	public SysResult getDeptJson(){
		SysResult sr = publicDao.getDeptTree();
		return sr;
	}
}
